/* 自定义样式 */
body {
    font-family: 'Inter', sans-serif;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 消息气泡样式 */
.message-user {
    background: #3b82f6;
    color: white;
    border-radius: 1rem 1rem 0 1rem;
}

.message-assistant {
    background: #374151;
    color: white;
    border-radius: 1rem 1rem 1rem 0;
}

/* 代码块样式 */
pre code.hljs {
    border-radius: 0.5rem;
    padding: 1rem;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 对话列表项样式 */
.conversation-item {
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.conversation-item.active {
    background-color: rgba(59, 130, 246, 0.2);
}

/* 加载动画 */
.typing-animation {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 40px;
}

.typing-animation span {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.typing-animation span:nth-child(1) {
    left: 8px;
    animation: typing1 0.6s infinite;
}

.typing-animation span:nth-child(2) {
    left: 8px;
    animation: typing2 0.6s infinite;
}

.typing-animation span:nth-child(3) {
    left: 32px;
    animation: typing2 0.6s infinite;
}

.typing-animation span:nth-child(4) {
    left: 56px;
    animation: typing3 0.6s infinite;
}

@keyframes typing1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes typing3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes typing2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}